package com.example.a2007dou_shop

import android.content.Context
import android.util.AttributeSet
import android.view.MotionEvent
import androidx.recyclerview.widget.RecyclerView

class VideoRecyclerView : RecyclerView {
    var flag = true
    constructor(context: Context) : super(context) {}
    constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {}
    constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
        context,
        attrs,
        defStyleAttr
    ) {
    }

    override fun onInterceptTouchEvent(e: MotionEvent?): Boolean {
        return if (flag) {
            super.onInterceptTouchEvent(e)
        } else {
            false
        }
    }
}